//
//  TwoCustomCell.m
//  JinChengYun
//
//  Created by 金橙云 on 2017/3/28.
//  Copyright © 2017年 金橙云. All rights reserved.
//

#import "TwoCustomCell.h"

@implementation TwoCustomCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        _aneTLab = [[UILabel alloc] init];
        _aneTLab.textColor = [UIColor blackColor];
        _aneTLab.font = [UIFont systemFontOfSize:12];
        _aneTLab.text = @"付款方式:";
        _aneTLab.textAlignment = NSTextAlignmentLeft;
        [self addSubview:_aneTLab];
        [_aneTLab mas_makeConstraints:^(MASConstraintMaker *make) {
                make.size.mas_equalTo(CGSizeMake(80, 20));
                make.left.mas_equalTo(self.mas_left).offset(12);
                make.top.mas_equalTo(self.mas_top).offset(10);
            }];
        
        _oneBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        _oneBtn.titleLabel.font = [UIFont systemFontOfSize:12];
        _oneBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
        [_oneBtn setTitle:@"按揭支付" forState:0];
        [_oneBtn setTitleColor:[UIColor blackColor] forState:0];
        [_oneBtn addTarget:self action:@selector(oneBtnClick:) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:_oneBtn];
        [_oneBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(200, 30));
            make.left.equalTo(_aneTLab.mas_right).offset(15);
            make.top.equalTo(self.mas_top).offset(5);
        }];
        
        _imgVi = [[UIImageView alloc] init];
        _imgVi.image = [UIImage imageNamed:@"sanJiao"];
        [self addSubview:_imgVi];
        [_imgVi mas_makeConstraints:^(MASConstraintMaker *make) {
            make.size.mas_equalTo(CGSizeMake(10, 10));
            make.right.equalTo(self.mas_right).offset(-20);
            make.top.mas_equalTo(self.mas_top).offset(15);
        }];
        
    }
    return self;
}


-(void)oneBtnClick:(UIButton *)btn
{
    NSLog(@"dianji-------%@",btn);
    

}






- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
